package com.xf.h.qiaoqian.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xf.h.qiaoqian.entity.TbQiaoqian;
import com.xf.h.qiaoqian.service.TbQiaoqianService;
import com.xf.h.qiaoqian.mapper.TbQiaoqianMapper;
import org.springframework.stereotype.Service;

/**
* @author 韩雪飞
* @description 针对表【tb_qiaoqian(喜帖表)】的数据库操作Service实现
* @createDate 2025-09-07 19:51:13
*/
@Service
public class TbQiaoqianServiceImpl extends ServiceImpl<TbQiaoqianMapper, TbQiaoqian>
    implements TbQiaoqianService{

    @Override
    public int getMaxIndexSort() {
        return baseMapper.getMaxIndexSort();
    }

    @Override
    public TbQiaoqian bestNew() {
        LambdaQueryWrapper<TbQiaoqian> wrapper = new LambdaQueryWrapper<>();
        int indexSort = getMaxIndexSort();
        wrapper.eq(TbQiaoqian::getIndexSort,indexSort);
        return getOne(wrapper);
    }
}




